

function pureText(s) {
    $("<div/>").html(s).text();
}

function goLogin() {
    location.href = "signin.asp";
}
function goLogOut() {
    $.ajax({
        url: "api.asp",
        type: "post",
        data: {
            "action": "logout"
        },
        success: function (data) {
            var oRet = pages.common.parseJSON(data);
            if (oRet) {
                if (oRet.ref == "ok") {
                    window.location.href = "index.asp?" + Math.random();
                } else {
                    alert("未知故障！登出失败");
                }
            } else {
                alert("未知故障！登出失败");
            }
        }
    });
}

function goAdmin(){
	location.href = "admin.asp";
}

function goHome(){
	location.href = "index.asp";
}